package com.glorystone.ins.domain;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.glorystone.ins.enums.OrderStatusEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

public @Data class Order {
    private Long tid;

    private String ordNum;//保单号

    private String ordCode;//订单编号

    private Long channelId;//渠道id

    private Long insyrerId;//保险公司id

    private Long productId;

    private String insurant;//被保险人

    private String orgIdCode;

    private String applicant;//投保人

    private String carOwner;

    private String phone;

    private LocalDate surrenderDate;//退保日期

    private String plateNum;//车牌号

    private Integer vehicleType;

    private String preInsyrer;//前保险公司

    private Integer status;//状态

    private String frameNumber;//车架号

    private String engineNum;

    private Integer typeInvestment;//投保类型

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insyrerMaturityDate;//垫资到期日

    private Integer laonAccount;//垫资账期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insureStartDate;//起保日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insureEndDate;//止保日期
    private Integer insureOverTime;

    private Long saleman;

    private Integer typeInsurance2;//垫资类型

    private Integer typeInsurance;//险种

    private BigDecimal mercialPremium;//商业保险费

    private BigDecimal pulsoryPremium;//交强保险费

    private BigDecimal vechcleVesselTax;//车船税

    private BigDecimal allPremium;//全保费

    private BigDecimal texPremium;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate dateIssuance;

    private Integer paySubject;

    private BigDecimal followPoint;

    private BigDecimal replenishPoint;

    private BigDecimal channelRebate;//渠道返点

    private BigDecimal channelLookRebate;//渠道参考返点

    private Long createBy;

    private Date createDate;

    private Long updateBy;

    private Date updateDate;

    private Integer delFlag;

    private String insyrerName;//保险公司名称

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate datePolicy;//保单生效日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate expireDate;//保单失效日期
    private Integer channelStatus;//渠道订单状态
    //private BigDecimal remaidFee;//返佣费
    public enum AdvanceFundType{
        /**
         * 不垫资
         */
        NO_ADVANCE_FUND(1),
        /**
         * 垫返点
         */
        PART_ADVANCE_FUND(2),
        /**
         * 垫保费
         */
        ALL_ADVANCE_FUND(3);
        private Integer value;

        AdvanceFundType(Integer value) {
            this.value = value ;
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }
    }
    public enum TypeInsuranceEnum{
        /**
         * 交强险
         */
        SALI(0),
        /**
         * 商业险
         */
        COMMERCE_INSURANCE(1);
        private Integer value;

        TypeInsuranceEnum(Integer value) {
            this.value = value ;
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }
    }

    public Long getTid() {
        return tid;
    }

    public void setTid(Long tid) {
        this.tid = tid;
    }

    public String getOrdNum() {
        return ordNum;
    }

    public void setOrdNum(String ordNum) {
        this.ordNum = ordNum == null ? null : ordNum.trim();
    }

    public String getOrdCode() {
        return ordCode;
    }

    public void setOrdCode(String ordCode) {
        this.ordCode = ordCode == null ? null : ordCode.trim();
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getInsyrerId() {
        return insyrerId;
    }

    public void setInsyrerId(Long insyrerId) {
        this.insyrerId = insyrerId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getInsurant() {
        return insurant;
    }

    public void setInsurant(String insurant) {
        this.insurant = insurant == null ? null : insurant.trim();
    }

    public String getOrgIdCode() {
        return orgIdCode;
    }

    public void setOrgIdCode(String orgIdCode) {
        this.orgIdCode = orgIdCode == null ? null : orgIdCode.trim();
    }

    public String getApplicant() {
        return applicant;
    }

    public void setApplicant(String applicant) {
        this.applicant = applicant == null ? null : applicant.trim();
    }

    public String getCarOwner() {
        return carOwner;
    }

    public void setCarOwner(String carOwner) {
        this.carOwner = carOwner == null ? null : carOwner.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getPlateNum() {
        return plateNum;
    }

    public void setPlateNum(String plateNum) {
        this.plateNum = plateNum == null ? null : plateNum.trim();
    }

    public Integer getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(Integer vehicleType) {
        this.vehicleType = vehicleType;
    }

    public String getPreInsyrer() {
        return preInsyrer;
    }

    public void setPreInsyrer(String preInsyrer) {
        this.preInsyrer = preInsyrer == null ? null : preInsyrer.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getFrameNumber() {
        return frameNumber;
    }

    public void setFrameNumber(String frameNumber) {
        this.frameNumber = frameNumber == null ? null : frameNumber.trim();
    }

    public String getEngineNum() {
        return engineNum;
    }

    public void setEngineNum(String engineNum) {
        this.engineNum = engineNum == null ? null : engineNum.trim();
    }

    public Integer getTypeInvestment() {
        return typeInvestment;
    }

    public void setTypeInvestment(Integer typeInvestment) {
        this.typeInvestment = typeInvestment;
    }

    public LocalDate getInsyrerMaturityDate() {
        return insyrerMaturityDate;
    }

    public void setInsyrerMaturityDate(LocalDate insyrerMaturityDate) {
        this.insyrerMaturityDate = insyrerMaturityDate;
    }

    public Integer getLaonAccount() {
        return laonAccount;
    }

    public void setLaonAccount(Integer laonAccount) {
        this.laonAccount = laonAccount;
    }

    public Integer getInsureOverTime() {
        return insureOverTime;
    }

    public void setInsureOverTime(Integer insureOverTime) {
        this.insureOverTime = insureOverTime;
    }

    public Long getSaleman() {
        return saleman;
    }

    public void setSaleman(Long saleman) {
        this.saleman = saleman;
    }

    public Integer getTypeInsurance2() {
        return typeInsurance2;
    }

    public void setTypeInsurance2(Integer typeInsurance2) {
        this.typeInsurance2 = typeInsurance2;
    }

    public Integer getTypeInsurance() {
        return typeInsurance;
    }

    public void setTypeInsurance(Integer typeInsurance) {
        this.typeInsurance = typeInsurance;
    }

    public BigDecimal getMercialPremium() {
        return mercialPremium;
    }

    public void setMercialPremium(BigDecimal mercialPremium) {
        this.mercialPremium = mercialPremium;
    }

    public BigDecimal getPulsoryPremium() {
        return pulsoryPremium;
    }

    public void setPulsoryPremium(BigDecimal pulsoryPremium) {
        this.pulsoryPremium = pulsoryPremium;
    }

    public BigDecimal getVechcleVesselTax() {
        return vechcleVesselTax;
    }

    public void setVechcleVesselTax(BigDecimal vechcleVesselTax) {
        this.vechcleVesselTax = vechcleVesselTax;
    }

    public BigDecimal getAllPremium() {
        return allPremium;
    }

    public void setAllPremium(BigDecimal allPremium) {
        this.allPremium = allPremium;
    }

    public BigDecimal getTexPremium() {
        return texPremium;
    }

    public void setTexPremium(BigDecimal texPremium) {
        this.texPremium = texPremium;
    }

    public Integer getPaySubject() {
        return paySubject;
    }

    public void setPaySubject(Integer paySubject) {
        this.paySubject = paySubject;
    }

    public BigDecimal getFollowPoint() {
        return followPoint;
    }

    public void setFollowPoint(BigDecimal followPoint) {
        this.followPoint = followPoint;
    }

    public BigDecimal getReplenishPoint() {
        return replenishPoint;
    }

    public void setReplenishPoint(BigDecimal replenishPoint) {
        this.replenishPoint = replenishPoint;
    }

    public BigDecimal getChannelRebate() {
        return channelRebate;
    }

    public void setChannelRebate(BigDecimal channelRebate) {
        this.channelRebate = channelRebate;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}